const useHandleLyric = (data: any) => {
    let transArr = []
    let lyricArr = <any>[]
    transArr = data.split('\n')
    transArr.forEach((item: string) => {
        let itemArr = item.split('[')[1].split(']')
        let mm = parseInt(itemArr[0].split(":")[0])
        let ss = parseInt(itemArr[0].split(":")[1])
        let time = mm * 60 + ss
        lyricArr.push({time, ly: itemArr[1]})
    })
    return lyricArr
}

export default useHandleLyric
